//
// Created by A on 2018/7/4.
//

#ifndef MEMCHECKER_MEMRECODER_H
#define MEMCHECKER_MEMRECODER_H

#include <stddef.h>

static char* Malloc="Malloc";
static char* Free="Free";

typedef  struct _MemOperateNode {
    char* operate;
    char *description;
    int descriptionLen;
    long ptrAddress;

    struct _MemOperateNode *next;
} MemOperateNode;

MemOperateNode* generateNode(char *des, int desLen, char* operate, long ptr);
void recordMalloc(char* des , int desLen , long ptr);
void recordFree(char* des , int desLen , long ptr);

void printAllRecord();

void printLeakRecord();

void dumpAllRecord(char *filePath);

void dumpLeakRecord(char *filePath);

void releaseRecord();

#endif //MEMCHECKER_MEMRECODER_H
